package db

type Connection struct {
	ConnID    string `db:"conn_id"`
	Source    int    `db:"source"`
	TripID    string `db:"trip_id"`
	ServiceID string `db:"service_id"`

	FromStopID       string `db:"from_stop_id"`
	FromStopIDU      string `db:"from_stop_idu"`
	FromStopSequence string `db:"from_stop_sequence"`
	FromST           uint   `db:"from_stop_time"`
	FromSSIDU        string `db:"from_stop_sidu"`

	ToStopID       string `db:"to_stop_id"`
	ToStopIDU      string `db:"to_stop_idu"`
	ToStopSequence string `db:"to_stop_sequence"`
	ToSSIDU        string `db:"to_stop_sidu"`
	ToST           uint   `db:"to_stop_time"`
}

type Transfer struct {
	FromSSIDU   string `db:"from_stop_sidu"`
	FromStopIDU string `db:"from_stop_idu"`
	FromStopID  string `db:"from_stop_id"`
	Source      int    `db:"source"`

	ToSSIDU    string `db:"to_stop_sidu"`
	ToStopIDU  string `db:"to_stop_idu"`
	ToStopID   string `db:"to_stop_id"`
	SourcePair int    `db:"source_pair"`

	TransferType     uint     `db:"transfer_type"`
	TransferCategory string   `db:"transfer_category"`
	MinTransferTime  *uint    `db:"min_transfer_time"`
	DistKM           *float64 `db:"dist_km"`

	TransferTime uint `db:"transfer_time"`
}

type StopWalk struct {
	StopSIDU string   `db:"stop_sidu"`
	StopName string   `db:"stop_name"`
	DistKM   *float64 `db:"dist_km"`
}

type ConnectionVerbose struct {
	Source         int     `db:"source" json:"source,omitempty"`
	ConnID         string  `db:"conn_id" json:"conn_id,omitempty"`
	Duration       string  `db:"duration" json:"duration,omitempty"`
	FromStopID     string  `db:"from_stop_id" json:"from_stop_id,omitempty"`
	DirectionID    *int    `db:"direction_id" json:"direction_id,omitempty"`
	FromStopIDU    string  `db:"from_stop_idu" json:"from_stop_idu,omitempty"`
	FromStopSIDU   string  `db:"from_stop_sidu" json:"from_stop_sidu,omitempty"`
	FromStopLat    float64 `db:"from_stop_lat" json:"from_stop_lat,omitempty"`
	FromStopLon    float64 `db:"from_stop_lon" json:"from_stop_lon,omitempty"`
	FromStopName   string  `db:"from_stop_name" json:"from_stop_name,omitempty"`
	FromStopTime   uint    `db:"from_stop_time" json:"from_stop_time,omitempty"`
	RouteID        string  `db:"route_id" json:"route_id,omitempty"`
	RouteShortName *string `db:"route_short_name" json:"route_short_name,omitempty"`
	RouteLongName  *string `db:"route_long_name" json:"route_long_name,omitempty"`
	TripID         string  `db:"trip_id" json:"tid,omitempty"`
	ToStopID       string  `db:"to_stop_id" json:"to_stop_id,omitempty"`
	ToStopIDU      string  `db:"to_stop_idu" json:"to_stop_idu,omitempty"`
	ToStopSIDU     string  `db:"to_stop_sidu" json:"to_stop_sidu,omitempty"`
	ToStopLat      float64 `db:"to_stop_lat" json:"to_stop_lat,omitempty"`
	ToStopLon      float64 `db:"to_stop_lon" json:"to_stop_lon,omitempty"`
	ToStopName     string  `db:"to_stop_name" json:"to_stop_name,omitempty"`
	ToStopTime     uint    `db:"to_stop_time" json:"to_stop_time,omitempty"`
	TripHeadsign   *string `db:"trip_headsign" json:"trip_headsign,omitempty"`
}
